<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <style>
            .column {
                width: 410px;
                vertical-align: top;
            }
            .rowc{
                text-align: right
            }
            .center{
                text-align:center;
                align:center;
            }
            .right{
                text-align:right;
                align:right;
            }
            .left{
                text-align:left;
            }
            .table{
                margin-top: 10px;
                text-align:left;
            }
            .font-style{
                font-size: 20px !important;
                font-weight: bolder;

            }
            .table tr{
                height:30px;
            }
        </style>
    </h:head>
    <h:form>
        <rich:panel styleClass="content-hight">
            <h:outputLabel value="最新公告" styleClass="font-style"/>
            <div style="margin-bottom: -10px;">
                <h:commandLink value="更多..." action="#{announce.getmore}" style="float: right;text-decoration: none;"/>     
            </div>
            <h:dataTable id="editTable"
                         value="#{announce.top5list}" var="item"
                         width="100%"
                         styleClass="table"
                         rows="10"
                         frame="hsides">
                <rich:column>
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="标题"/>
                        </h:panelGroup>
                    </f:facet>

                    <h:commandLink action="#{announce.queryTitle}" value=" #{item.title}">
                        <f:param  name="qtitle" value="#{item.id}"/>
                    </h:commandLink>
                </rich:column>

                <rich:column>
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="概要"/>
                        </h:panelGroup>
                    </f:facet>

                    <h:outputText    value="#{item.outline}"/>
                </rich:column>

                <rich:column>
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="最后修改时间"/>
                        </h:panelGroup>
                    </f:facet>

                    <h:outputText value="#{item.lastchangedate}"
                                  style="padding-left: 10px;">
                        <f:convertDateTime pattern="yyyy/MM/dd"/>
                    </h:outputText>
                </rich:column>

            </h:dataTable>
        </rich:panel>
    </h:form>
</ui:composition>
